package com.testmanager.testmananger.user.service;


import com.testmanager.testmananger.foundation.dto.ConstantDto;
import com.testmanager.testmananger.foundation.mapper.ConstantMapper;
import com.testmanager.testmananger.user.constants.UserJobType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

@Service
@Slf4j
public class ConstantService {

    public List<ConstantDto> getUserJobType(){
        List<ConstantDto> result = new ArrayList<>();
        Arrays.stream(UserJobType.values())
                .forEach(t -> {
                   /* ConstantDto constantDto = new ConstantDto();
                    constantDto.setCode(t.name())
                            .setName(t.getName())
                            .setValue(t.getValue());
                    result.add(constantDto);*/
                   result.add(ConstantMapper.toConstantDto(t));
                });
        return result;
    }





}
